﻿<template>
    <el-radio-button v-if="display=='button'"
                     v-bind="$myProps"
                     v-on="$myListeners">
        <slot></slot>
    </el-radio-button>
    <el-radio v-else
              v-bind="$myProps"
              v-on="$myListeners">
        <slot></slot>
    </el-radio>
</template>

<script>
    export default {
        props: {
            value: String,
            display: {
                type: String,
                default: 'radio'
            }
        },
        computed: {
            $myProps () {
                return this.$public.inheritProps(this)
            },
            $myListeners () {
                return this.$public.inheritListeners(this)
            }
        },
        mounted () {
            this.$emit('mounted')
        },
        created () {
            this.$emit('created')
        }
    }
</script>